<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>KAKA</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
        <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <script type='text/javascript' src='/public/js/jquery-3.1.1.min.js'></script>
        <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
        <script type="text/javascript" src='/public/js/main/main.js'></script>
        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "//hm.baidu.com/hm.js?8d43b5b5d798921b66d689f7a792e6e2";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <script type="text/javascript">
            document.domain = '<?php echo _DOMAIN_ALL_;?>';
        </script>
        <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    </head>
    <body style="background-color: #f4f4f4">
 
<link href="/public/css/main.css" rel="stylesheet">
<script type="text/javascript">
    $(document).ready(function () {
        $('._header').width($('.container').width());
    })
</script>
<div class="container" style="background-color: white">
    <div class='_main'>
        <div class="banner">
           <!--  <div class='_logo'>
                <a href='/'><img src="/public/images/kaka.png" class='logo_img'  alt='banner'/></a>
            </div> -->
            <a href='/'><img src="/public/images/banner.png" class='banner_img'  alt='banner'/></a>
        </div>
        <div class='_header'>
            <div style='padding-right: 5rem;padding-top:1px' id="welcome">
                <span class=''><a class='_a' href="/home/passport/login"><img src="/public/images/login.png" width='90px' ></a></span>
                <span class='_span'></span>
                <span class='_span'><a class='_a' href="/home/passport/register"><img src="/public/images/register.png" width='90px' ></a></span>
            </div>
            <div style='display:none;color:white' id="already_login">
                <span class='as'><a class='_a color1' href="javascript:void(0);"><b id="login_name"></b><?php if( $msg_num != 0 ){ ?> <a href="/home/message/message"><span class="_message"><?php echo $msg_num; ?></span></a> <?php }?></a> </span>
                <span class='_span as'><b>|</b></span>
                <span class='_span' style="width:7rem"><a class='_a color1' href="/home/passport/repassword"><b>修改密码</b></a></span>
                <span class='_span as'><b>|</b></span>
                <span class='_span'><a class='_a color1' href="/home/passport/logout"><b>退出</b></a></span>
            </div>
        </div>
        <div class="_menu" id='_menu'>
            <div class='_menu_in'>
                <!-- <span class='_menu_b'>
                    <a class='wa' href="/home/company">公司</a>
                </span> -->
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/store')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/store')){?>_a<?php }else{?>wa<?php }?>" href='/home/store'>店铺</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'home/barber')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/barber')){?>_a<?php }else{?>wa<?php }?>" href='/home/barber'>成员</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/action')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/action')){?>_a<?php }else{?>wa<?php }?>" href='/home/action'>活动</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/order')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/order')){?>_a<?php }else{?>wa<?php }?>" href='/home/order'>订单</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/coupon')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/coupon')){?>_a<?php }else{?>wa<?php }?>" href='/home/coupon'>优惠劵</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/goods')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/goods')){?>_a<?php }else{?>wa<?php }?>" href='/home/goods'>商品</a>
                </span>
            </div>
        </div>
        <div class='_line'></div>
 
<div class="_contro">
    <a href="/home/action/" class="_a"><font class="_font">返回</font></a>
</div>
<div class='_cut'></div>
<div id='content'>
    <h2><?php echo $action['action_name'];?>&nbsp;&nbsp;活动分析总结</h2>
    <div class='_line'></div>
    <div>
        <div id="chart" style="height:400px;width:100%; "></div>   
    </div>
    <div class='_line'></div>
    <div style='width:100%;text-align: right'>
        <span style='background-color: #F9F900'>&nbsp;&nbsp;&nbsp;&nbsp;</span>全部&nbsp;&nbsp;&nbsp;&nbsp;
        <span style='background-color: #00DB00'>&nbsp;&nbsp;&nbsp;&nbsp;</span>已支付&nbsp;&nbsp;&nbsp;&nbsp;
        <span style='background-color: #FF2D2D'>&nbsp;&nbsp;&nbsp;&nbsp;</span>未支付&nbsp;&nbsp;&nbsp;&nbsp;
        <span style='background-color: #46A3FF'>&nbsp;&nbsp;&nbsp;&nbsp;</span>已完成&nbsp;&nbsp;&nbsp;&nbsp;
    </div>
    <div class='_line'></div>
    <div class='_line'></div>
    <div>
        本次活动产生订单：&nbsp;&nbsp;<font style='color:red'><?php echo $count_order['pay']+$count_order['not_pay']+$count_order['over'];?></font>&nbsp;&nbsp;，其中
        已支付定金订单：&nbsp;&nbsp;<font style='color:red'><?php echo $count_order['pay'];?></font>&nbsp;&nbsp;，未支付订单：
        &nbsp;&nbsp;<font style='color:red'><?php echo $count_order['not_pay'];?></font>&nbsp;&nbsp;，已完成订单：&nbsp;&nbsp;<font style='color:red'><?php echo $count_order['over'];?></font>&nbsp;&nbsp;单。
        <div class='_line'></div>
        本次活动参与用户共：&nbsp;&nbsp;<font style='color:red'><?php echo count($mobiles);?></font>&nbsp;&nbsp;人。<br/>
        <div class='_line'></div>
        其中重点用户：&nbsp;&nbsp;<font style='color:red'><?php echo count($key_user);?></font>&nbsp;&nbsp;人<br/>
        <div class='_fang'>
        <?php foreach($key_user as $k=>$v){ ?>
        <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;
        成交单数：&nbsp;&nbsp;<font style='color:red'><?php echo $v['c'];?></font>&nbsp;&nbsp;单<br/>
        <?php }?>
        </div>
        <div class='_line'></div>
        其中潜在用户：&nbsp;&nbsp;<font style='color:red'><?php echo count($latency_user['key'])+count($latency_user['list']);?></font>&nbsp;&nbsp;人<br/>
        <div class='_fang'>
            <div class='fang'>
            待重点培养用户&nbsp;&nbsp;<font style='color:red'><?php echo count($latency_user['key']);?></font>&nbsp;&nbsp;人：<br/>
            <?php foreach($latency_user['key'] as $k=>$v){ ?>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <br/>
            <?php }?>
            </div>
            <div class='_line'></div>
            <div class='fang'>
            待培养用户&nbsp;&nbsp;<font style='color:red'><?php echo count($latency_user['list']);?></font>&nbsp;&nbsp;人：<br/>
            <?php foreach($latency_user['list'] as $k=>$v){ ?>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <br/>
            <?php }?>
            </div>
        </div>
        <div class='_line'></div>
        本次活动用户贡献排行：
        <div class='_fang'>
            <?php foreach($devote_user as $v){ ?>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;<font style='color:red'><?php echo $v['c'];?></font>&nbsp;&nbsp;个开团
            <br/>
            <?php }?>
        </div>
        <div class='_line'></div>
        本次活动发型师贡献排行：
        <div class='_fang'>
            <table style='width:100%;border: 0'>
            <?php foreach($devote_barber as $v){ ?>
            <tr>
                <td style='width:20%'>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['name'];?></a>
                </td>
                <td>
            <font style='color:red'><?php echo $v['c'];?></font>&nbsp;&nbsp;单
            </td>
            <tr/>
            <?php }?>
            </table>
        </div>
        <div class='_line'></div>
    </div>
</div>
<script type='text/javascript' src='/public/js/jquery.jqplot.min.js'></script>
<script language="javascript" type="text/javascript" src="/public/js/plugins/jqplot.pieRenderer.js"></script>
<!--[if IE]><script type='text/javascript' src='/public/js/excanvas.js'></script><![endif]-->
<link rel="stylesheet" type="text/css" href="/public/css/jquery.jqplot.css" />  
<script type='text/javascript'>
    $(document).ready(function(){
        var _date = function(format, val){
            var newDate = new Date();
            newDate.setTime(val * 1000);
            var m = newDate.getMonth()+1;
            return m+'.'+newDate.getDate();
        }
        $.jqplot(
                'chart',  <?php echo json_encode($table_data);?>,
                {
                    title:"<?php echo $action['action_name'];?>&nbsp;&nbsp;活动数据图表",
                    seriesColors: [ "#00DB00", "#FF2D2D", "#46A3FF","#F9F900", "#579575"],  
                    axisDefaults: {},
                    axes: {  
                        xaxis: {   
                            tickOptions: { formatter: _date }, 
                        },
                    },
                }
        );
    })
</script>

</div>
<div class="_line"></div>
<div class="_footer">
    ©2015-<?php echo date('Y');?> All Rights Reserved ( 京ICP备15010043号 )
</div>
</div>
<div id='mask_layer' style="text-align: center;width:100%;height:100%;overflow:hidden;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8E8E8E',endColorstr='##8E8E8E');
    background-color:rgba(255, 255, 255, 0.4);position:fixed; _position:absolute; top:0;left:0; z-index:5000;display:none ">
    <div style="padding-top: 20%"><h1><b>loading<span id="_loading"></span></b></h1></div>
</div>
    </body>
</html>